-
Notifications
You must be signed in to change notification settings - Fork 50
FOUR-29250 End Event – External URL with Mustache/FEEL Support #1963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Description:
feat(end event): support Mustache in external URL for element destination
- Resolve Mustache expressions in end event "External URL" when the token
reaches the end event, using the same context as scripts/screens
(APP_URL, _request, _user, process variables).
- Add getElementDestinationMustacheContext() to build context via DataManager
with fallback; normalize to plain array for Mustache.
- Add resolveElementDestinationUrl() to decode HTML entities and render
URL template with MustacheExpressionEvaluator. FEEL is not supported.
- Apply resolution only for externalURL type; conditional redirect URLs
also go through Mustache when destination is external URL.
- Harden getElementDestinationAttribute(): ensure conditionalRedirectProp
and elementDestinationProp are never null (json_decode ?? [], pass ?? []).
- Modeler: allow URL validation when string contains {{ (Mustache); update
helper and error copy to document _request.id, _user.id, process vars.
Related tickets:
https://processmaker.atlassian.net/browse/FOUR-29250
modeler
|
||||||||||||||||||||||||||||||||||
| Project |
modeler
|
| Branch Review |
feature/FOUR-29250
|
| Run status |
|
| Run duration | 04m 11s |
| Commit |
|
| Committer | Roly Rudy Gutierrez Pinto |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
1
|
|
|
0
|
|
|
14
|
|
|
0
|
|
|
191
|
| View all changes introduced in this branch ↗︎ | |
Tests for review
StartTimerEvent.cy.js • 1 failed test
| Test | Artifacts | |
|---|---|---|
| Start Timer Event > can set a specific end date |
Test Replay
Screenshots
|
|
The first 5 failed specs are shown, see all 73 specs in Cypress Cloud.
…pector to display element configuration data (formData) as key-value pairs with keyboard-accessible toggle.
|
| return ''; | ||
| }, | ||
| isValidURL(string) { | ||
| if (!string || typeof string !== 'string') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null, undefined, 123, {}, [] will be valid for a isValidURL method
| return true; | ||
| } | ||
| // Allow Mustache: same context as backend (APP_URL, _request, _user, process variables) | ||
| if (string.includes('{{')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"{{"
"{{invalid"
"hello {{"
will be evaluated as a valid value, try a regEx patern
example
const mustachePattern = /{{\s*[^}]+\s*}}/;




Description:
feat(end event): support Mustache in external URL for element destination
Related tickets:
https://processmaker.atlassian.net/browse/FOUR-29250